async function fetchInventory() {
  const config = await getConfig();
  if(config.inventory != 'TRUE') return;

  await switchCountry('us')

  const url = 'https://sellercentral.amazon.com/inventoryplanning/manageinventoryhealth?ref_=xx_invplan_favb_xx'
  openUrlAndExecScript(url, 'apps/fetch_inventory/content.js', async data => {
    const brand = await getEndpoint();
    let sleetMs = parseInt(Math.random() * 1000 * 30)
    console.log("随机休息毫秒时间：", sleetMs)
    await sleep(sleetMs); // 随机等待一段时间，避免所有店铺同时提交造成错误
    await post('https://api.miraazzurra.com/amazon/inventory', { brand: brand, records: data })
  })
}
